program define incent_byparty
   version 15.1
	syntax varlist [if] [pweight], [OPTS(str)]
	marksample touse
	if "`weight'" ~= "" {
	   local wt [`weight'`exp']
   }	
	tempname fx1 fx2 fx3
	forvalues p = 1/3 {
	   di _n(2) "** Party `p' **"
	   incent `varlist' if `touse' & pid3==`p' `wt', nodraw
      mat `fx`p'' = r(fx)
	}
	
   * Combine plots horizontally
	local gopts scheme(s1mono) plotregion(style(none)) mlabel ///
	   format(%3.0f) mlabpos(12)
   coefplot (matrix(`fx1'[1,]), ci("`fx1'[5,] `fx1'[6,]") msymbol(O) mlabpos(2)), bylabel(Democrats) ///
		||  ///
		(matrix(`fx2'[1,]), ci("`fx2'[5,] `fx2'[6,]") msymbol(O) mlabpos(2)), bylabel(Independents) ///
		|| ///
		(matrix(`fx3'[1,]), ci("`fx3'[5,] `fx3'[6,]") msymbol(O) mlabpos(2)), bylabel(Republicans) ///
		/*order(nn yy yn)*/ keep(nn yn) order(nn yn) ///
		/*coeflabel(nn="No Shaming" yy="Blanket Shaming" yn="Selective Shaming")*/ ///		
		coeflabel(nn="No Shaming" yn="Shaming") ///
		`gopts' `opts'	///
		byopts(rows(1) legend(off)) subtitle(, fcolor(white))
end
